<!DOCTYPE HTML>
<html>

<head>
	<meta charset="utf-8">
	<meta name="viewport" content="maximum-scale=1.0, minimum-scale=1.0, user-scalable=0, initial-scale=1.0, width=device-width" />
	<meta name="format-detection" content="telephone=no, email=no, date=no, address=no">
	<title>Hello APP</title>
	<link rel="stylesheet" type="text/css" href="../../css/aui-flex.css" />
	<link rel="stylesheet" type="text/css" href="../../css/aui.css" />
	<link rel="stylesheet" type="text/css" href="../../css/common.css" />
	<style>
		.title-left {
			margin-right: 0.4rem;
		}

		body {
			background: #f1f1f1;
		}

		.order-list {
			padding: 1rem;
			background: #fff;
			margin-top: 0.4rem;
		}

		.order-list .order-head {
			padding-bottom: 1rem;
		}

		.order-list .order-item {
			padding: 0 0 0.75rem;
		}

		.order-list .media {
			width: 3.6rem;
		}

		.textBox {
			min-height: 4.5rem;
			padding-left: 0.5rem;
		}

		.fot-btn>div {
			width: 3.6rem;
			height: 1.4rem;
			border: 1px solid #adadad;
			border-radius: 0.8rem;
			text-align: center;
			line-height: 1.3rem;
			font-size: 0.6rem;
			color: #adadad;
		}

		.fot-btn>div.collect {
			color: #E73450;
			margin-left: 0.7rem;
			border: 1px solid #E73450;
		}

		.order-list .tag {
			margin-top: -0.1rem;
			margin-right: 0.4rem;
			display: inline-block;
			color: #FFF;
			background: #FA7D83;
			border-radius: 0.1rem;
			font-size: 0.4rem;
			padding: 0 0.15rem;
			line-height: 0.75rem;
			vertical-align: middle;
		}

		.order-list .tag.on {
			background: #FFC667;
		}

		.no-more {
			padding: 0.6rem 0;
		}
	</style>
</head>

<body>
	<div>
		<div class="notData aui-hide aui-flex-row aui-flex-middle aui-flex-center">
			<img src="../../image/notData/04.png" alt="">
			<p class="color-ad">您还没有相关订单哟</p>
		</div>
		<div id="orders" style="padding:12px;">
			<h3>二级</h3>
			<ul style="padding-top:12px;">
				<li v-for="(item,index) in sec" style="background:#fff; padding:12px; margin-bottom:12px;">
					<div style="display:flex;align-items: center; justify-content:space-between;">
						<div style="width:100px;">
							<img :src="item.pict_url" style="width:100%;" />
						</div>
						<div style="padding-left:12px;display:flex;justify-content:space-between;">
							<div style="flex:1; padding-right:12px;" v-text="item.title"></div>
							<div>
								<p v-text="'￥'+item.pay_price"></p>
								<p style="text-align:right" v-text="'x'+item.item_num"></p>
							</div>
						</div>
					</div>
					<div style="text-align:right; color:#999; padding-top:12px;">
						共<span v-text="item.item_num"></span>件商品
						合计：￥<strong v-text="(item.pay_price*item.item_num)"></strong>
					</div>
				</li>
			</ul>
			<h3>三级</h3>
			<ul style="padding-top:12px;">
				<li v-for="(item,index) in third" style="background:#fff; padding:12px; margin-bottom:12px;">
					<div style="display:flex;align-items: center; justify-content:space-between;">
						<div style="width:100px;">
							<img :src="item.pict_url" style="width:100%;" />
						</div>
						<div style="padding-left:12px;display:flex;justify-content:space-between;">
							<div style="flex:1; padding-right:12px;" v-text="item.title"></div>
							<div>
								<p v-text="'￥'+item.pay_price"></p>
									<p style="text-align:right" v-text="'x'+item.item_num"></p>
							</div>
						</div>
					</div>
					<div style="text-align:right; color:#999; padding-top:12px;">
						共<span v-text="item.item_num"></span>件商品
						合计：￥<strong v-text="(item.pay_price*item.item_num)"></strong>
					</div>
				</li>
			</ul>
		</div>
		<script type="text/x-dot-template" id="order-list-tpl">

		</script>
	</div>
</body>
<script type="text/javascript" src="../../script/import.js"></script>
<script type="text/javascript" src="../../script/common.js"></script>
<script type="text/javascript" src="../../script/vue.js"></script>
<script type="text/javascript">
	var ORDER_STATUS = 0;
	apiready = function() {


		var vm = new Vue({
			el: '#orders',
			data: {
				sec: [],
				third: []
			},
			created() {
				this.getData()
			},
			methods: {
				getData() {
					let _this = this
					api.ajax({
						url: BASE_URL + 'app/select/taokeorder',
						method: 'post',
						data: {
							values: {
								userid: getUserId(),
							}
						}
					}, function(ret, err) {
						console.log(JSON.stringify(ret))
						_this.sec = ret.A
						_this.third = ret.B

					});
				}
			}
		})


	}
</script>

</html>
